using System.Collections.Generic;

public class SkillConfig
{
	protected Dictionary<PlayerStatsManager.SkillType, SkillDescription> config = new Dictionary<PlayerStatsManager.SkillType, SkillDescription>();

	public PlayerStatsManager.SkillType[] displaySkills;

	public static SkillConfig OriginalPlayerConfig()
	{
		SkillConfig skillConfig = new SkillConfig();
		skillConfig.InitSimple();
		return skillConfig;
	}

	public static SkillConfig ExtendedPlayerConfig()
	{
		SkillConfig skillConfig = new SkillConfig();
		skillConfig.InitExtended();
		return skillConfig;
	}

	protected void InitSimple()
	{
		SkillDescription skillDescription = new SkillDescription();
		skillDescription.name = "Attack";
		SkillDescription value = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Topspin";
		skillDescription.compositeList = new PlayerStatsManager.SkillType[1];
		SkillDescription value2 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Backspin";
		skillDescription.compositeList = new PlayerStatsManager.SkillType[1];
		SkillDescription value3 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Serve";
		skillDescription.compositeList = new PlayerStatsManager.SkillType[1];
		SkillDescription value4 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Defense";
		SkillDescription value5 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Racket";
		SkillDescription value6 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Speed";
		SkillDescription value7 = skillDescription;
		config.Add(PlayerStatsManager.SkillType.Attack, value);
		config.Add(PlayerStatsManager.SkillType.Topspin, value2);
		config.Add(PlayerStatsManager.SkillType.Backspin, value3);
		config.Add(PlayerStatsManager.SkillType.Serve, value4);
		config.Add(PlayerStatsManager.SkillType.Defence, value5);
		config.Add(PlayerStatsManager.SkillType.Racket, value6);
		config.Add(PlayerStatsManager.SkillType.Speed, value7);
		displaySkills = new PlayerStatsManager.SkillType[4]
		{
			PlayerStatsManager.SkillType.Attack,
			PlayerStatsManager.SkillType.Defence,
			PlayerStatsManager.SkillType.Racket,
			PlayerStatsManager.SkillType.Speed
		};
	}

	protected void InitExtended()
	{
		SkillDescription skillDescription = new SkillDescription();
		skillDescription.name = "Attack";
		skillDescription.compositeList = new PlayerStatsManager.SkillType[3]
		{
			PlayerStatsManager.SkillType.Topspin,
			PlayerStatsManager.SkillType.Backspin,
			PlayerStatsManager.SkillType.Serve
		};
		SkillDescription value = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Topspin";
		SkillDescription value2 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Backspin";
		SkillDescription value3 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Serve";
		SkillDescription value4 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Defense";
		SkillDescription value5 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Racket";
		SkillDescription value6 = skillDescription;
		skillDescription = new SkillDescription();
		skillDescription.name = "Speed";
		SkillDescription value7 = skillDescription;
		config.Add(PlayerStatsManager.SkillType.Attack, value);
		config.Add(PlayerStatsManager.SkillType.Topspin, value2);
		config.Add(PlayerStatsManager.SkillType.Backspin, value3);
		config.Add(PlayerStatsManager.SkillType.Serve, value4);
		config.Add(PlayerStatsManager.SkillType.Defence, value5);
		config.Add(PlayerStatsManager.SkillType.Racket, value6);
		config.Add(PlayerStatsManager.SkillType.Speed, value7);
		displaySkills = new PlayerStatsManager.SkillType[6]
		{
			PlayerStatsManager.SkillType.Topspin,
			PlayerStatsManager.SkillType.Backspin,
			PlayerStatsManager.SkillType.Serve,
			PlayerStatsManager.SkillType.Defence,
			PlayerStatsManager.SkillType.Racket,
			PlayerStatsManager.SkillType.Speed
		};
	}

	public SkillDescription GetSkillDescrption(int skillTypeIndex)
	{
		if (config.ContainsKey((PlayerStatsManager.SkillType)skillTypeIndex))
		{
			return config[(PlayerStatsManager.SkillType)skillTypeIndex];
		}
		return null;
	}
}
